/* ==UserStyle==
@name         YA Fandom Debloater
@namespace    github.com/openstyles/stylus
@version      1.5.0
@preprocessor less
@description  (Yet Another Fandom Debloater)
@author       Steve0Greatness
@homepageURL  https://notabug.org/Steve0Greatness/Yet-Another-Fandom-Debloater
@supportURL   https://notabug.org/Steve0Greatness/Yet-Another-Fandom-Debloater/issues
@updateURL    https://notabug.org/Steve0Greatness/Yet-Another-Fandom-Debloater/raw/master/fandom-debloater.user.css
@license      GPL-v3
@var checkbox show-comments "Show article comments" 0
@var checkbox use-global-colors-notifications "Use global colors for Fandom elements (sidebar)" 0
@var checkbox use-global-colors-search "Use global colors for search" 0
@var checkbox hide-popular-searches "Hide popular searches" 1
@var checkbox use-global-colors-fandom-el "Use global colors for elements made by Fandom (e.g. slider)" 0
@var checkbox show-urls-as-external "Show external link icon" 1
@var checkbox user-global-colors-on-footer "Use global colors on the footer" 0
===/UserStyle== */
@-moz-document domain("fandom.com") {
    #articleComments {
        margin-top: 3em;
        & when (@show-comments = 0) {
            display: none !important;
        }
    }

    .nkch-rdp,
    .ad-slot-placeholder,
    .global-navigation__logo,
    .global-navigation__search,
    #mixed-content-footer,
    #article-comments-button,
    .global-navigation__links,
    .global-navigation__top,
    .page-side-tool.content-size-toggle,
    .page__right-rail,
    .global-footer__section.global-footer__section-fandom-apps,
    .global-footer__section.global-footer__section-fandom-stores,
    .global-footer__section.global-footer__section-social-links,
    .global-footer__section-fandom-overview,
    .global-footer__bottom,
    .global-footer__content div:nth-child(1),
    .highlight__sticky-container,
    .unified-search__layout__right-rail,
    .unified-search__input__wrapper .wds-dropdown,
    .global-navigation__bottom .wds-dropdown__content .wds-list::before,
    .global-navigation__bottom .wds-dropdown__content .wds-list::after {
        display: none !important;
    }
    
    .global-footer__content div:has(.global-footer__section-fandom-apps) {
        display: none !important;
    }
    
    .fandom-slider__nav when (@use-global-colors-fandom-el = 0) {
        background-color: rgba(var(--theme-page-background-color--secondary--rgb), 0.5);
    }

    .global-navigation_bottom {
        box-shadow: none;
    }

    .global-navigation,
    .global-navigation__bottom {
        background: none;
    }

    .global-navigation {
        height: fit-content;
    }

    .main-container {
        margin: 0;
        min-width: initial;
        width: 100%;
    }

    .page__main {
        padding-right: 18px;
    }

    [class^=CommentList_empty-state__] {
        padding: 20px 10px;
    }

    .global-footer__content {
        grid-template-columns: repeat(2, 1fr) !important;
        padding: 0 !important;
    }

    .global-footer__bottom {
        background: none;
        font-weight: bold;
    }

    .fandom-sticky-header {
        left: 0 !important;
        right: 0 !important;
    }

    .global-navigation__icon {
        background-color: var(--fandom-dropdown-background-color);
        & when (@use-global-colors-notifications = 0) {
            background-color: var(--theme-page-background-color);
            border-color: var(--theme-border-color);
        }
    }
    
    .search-seeding when (@hide-popular-searches = 1) {
        display: none !important;
    }
    
    .search-modal__content {
        height: auto !important;
        min-height: 0 !important;
        & when (@use-global-colors-search = 0) {
            border-color: var(--theme-border-color);
        }
    }
    
    .search-modal__content .top-results__link when (@use-global-colors-search = 0)  {
        color: var(--theme-link-color);
    }
    .search-modal__content .top-results__link:hover when (@use-global-colors-search = 0)  {
        color: var(--theme-link-color--hover);
    }
    
    .global-footer when (@user-global-colors-on-footer = 0) {
        margin: 0 !important;
        border-top: var(--theme-page-text-color) 1px solid;
        color: var(--theme-page-text-color);
        background: rgba(var(--theme-page-background-color--rgb), 0.5) !important;
        *:not(a) {
            color: var(--theme-page-text-color);
        }
        :link,
        :visited {
            color: var(--theme-link-color);
        }
    }
    
    .global-footer when (@user-global-colors-on-footer = 1) {
        margin: 0 !important;
        border-top: #fff 1px solid;
        background-color: #0005 !important;
    }
    
    .search-modal,
    .search-modal::before {
        left: 0 !important;
    }
    
    .search-modal::before when (@use-global-colors-search = 0) {
        background-color: #000000e6;
    }
    
    .search-modal form .wds-button when (@use-global-colors-search = 0) {
        --wds-primary-button-background-color: var(--theme-link-color);
        --wds-primary-button-background-color--hover: var(--theme-link-color--hover);
        --wds-primary-button-label-color: var(--theme-link-label-color);
    }
    
    .search-modal form when (@use-global-colors-search = 0) {
        border-bottom-color: var(--theme-link-color);
    }
    
    .search-modal__content .wds-list :any-link {
        color: var(--theme-link-color) !important;
        background: none !important;
    }
    .search-modal__content .wds-list :any-link:hover {
        color: var(--theme-link-color--hover) !important;
    }
    
    .search-modal__content when (@use-global-colors-search = 0) {
        background-color: var(--theme-page-background-color) !important;
    }
    
    .search-seeding when (@use-global-colors-search = 0)  {
        color: var(--theme-body-text-color);
    }
    
    .highlight__wiki-btn when (@use-global-colors-search = 0)  {
        color: var(--theme-body-text-color);
    }
    
    .unified-search__layout {
        display: grid;
        grid-template-areas: "left left main main main main main main main right right right" !important;
        grid-template-columns: 1fr !important;
    }
    
    .global-navigation__bottom .wds-dropdown__content when (@use-global-colors-notifications = 0) {
        background-color: var(--theme-page-background-color);
        border-color: var(--theme-border-color);
        color: var(--theme-body-text-color) !important;
    }
    
    .global-navigation__bottom .wds-dropdown__content :any-link,
    .global-navigation__signout-button {
        & when (@use-global-colors-notifications = 0) {
            color: var(--theme-link-color) !important;
        }
        &:hover when (@use-global-colors-notifications = 0) {
            color: var(--theme-link-color--hover) !important;
            background: var(--theme-page-background-color--secondary) !important;
        }
    }
    
    
    .global-navigation__bottom .wds-dropdown__content ul when (@use-global-colors-notifications = 0) {
        background: none !important;
        border-color: var(--theme-border-color);
    }
    
    .global-navigation__bottom .wds-tabs__tab when (@use-global-colors-notifications = 0) {
        color: var(--theme-body-text-color);
        &.wds-is-current {
            color: var(--theme-link-color);
            &:hover {
                color: var(--theme-link-color--hover);
            }
        }
    }
    
    .global-navigation__bottom .wds-dropdown.wds-open-to-right::before when (@use-global-colors-notifications = 0) {
        border-right-color: var(--theme-border-color);
    }
    
    .global-navigation .wds-dropdown when (@use-global-colors-notifications = 0) {
        --wds-dropdown-background-color: var(--theme-page-background-color);
    }
    
    
    [class^=NotificationsContent-module_specialPageLink__] when (@use-global-colors-notifications = 0) {
        background-color: var(--theme-page-background-color);
    }
    
    [class^=NotificationsContent-module_contentHeader__] when (@use-global-colors-notifications = 0) {
        border-color: var(--theme-border-color);
    }
    
    :any-link.external::after when (@show-urls-as-external = 1) {
        vertical-align: super;
        content: "☍";
        display: inline-block;
    }
}
